package com.yanqu.road.entity.activity.unionwar;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

/**
 * 商会战-场次奖励
 */
@FieldTypeAnnotation(tableName = "t_u_activity_unionwar_session_reward")
public class UnionWarSessionReward extends DataObject {
    /**
     * 活动id
     */
    @FieldTypeAnnotation(select = true, update = true, desc = "活动id")
    private int activityId;
    /**
     * 玩家id
     */
    @FieldTypeAnnotation(update = true, desc = "玩家id")
    private long userId;
    /**
     * 阶段（积分赛、决赛）
     */
    @FieldTypeAnnotation(update = true, desc = "阶段（积分赛、决赛）")
    private int phase;
    /**
     * 场次
     */
    @FieldTypeAnnotation(update = true, desc = "场次")
    private int session;
    /**
     * 商会id
     */
    @FieldTypeAnnotation(desc = "商会id")
    private String unionUid;
    /**
     * 奖励
     */
    @FieldTypeAnnotation(desc = "奖励")
    private String reward;
    /**
     * 是否领奖
     */
    @FieldTypeAnnotation(desc = "是否领奖")
    private boolean getReward;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public int getPhase() {
        return phase;
    }

    public void setPhase(int phase) {
        if(this.phase != phase) {
            this.phase = phase;
            setUpdateOption();
        }
    }

    public int getSession() {
        return session;
    }

    public void setSession(int session) {
        if(this.session != session) {
            this.session = session;
            setUpdateOption();
        }
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid, unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        if(!Objects.equals(this.reward, reward)) {
            this.reward = reward;
            setUpdateOption();
        }
    }

    public boolean isGetReward() {
        return getReward;
    }

    public void setGetReward(boolean getReward) {
        if(this.getReward != getReward) {
            this.getReward = getReward;
            setUpdateOption();
        }
    }
}
